<html>
  <head>
  </head>
<body>
  <h1>RegExp object</h1>
  <p>Represents compiled regular expresion.</p>
  <p>RE Syntax supported:</p>
  <table border=1 cellpadding=3>
    <tr>
      <td class="header">Character</td>
      <td class="header">Meaning</td></tr>
    <tr>
      <td><code>\</code></td>
      <td>
        <p>For characters that are usually treated literally, indicates that the next character is special and not to be interpreted literally.</p>
        <p>For example, <code>/b/</code> matches the character 'b'. By placing a backslash in front of b, that is by using <code>/\b/</code>, the character becomes special to mean match a word boundary.</p>
        <p><em>or</em></p>
        <p>For characters that are usually treated specially, indicates that the next character is not special and should be interpreted literally.</p>
        <p>For example, * is a special character that means 0 or more occurrences of the preceding character should be matched; for example, <code>/a*/</code> means match 0 or more &quot;a&quot;s. To match <code>*</code> literally, precede it with a backslash; for example, <code>/a\*/</code> matches 'a*'.</p></td></tr>
    <tr>
      <td><code>^</code></td>
      <td>
        <p>Matches beginning of input. If the multiline flag is set to true, also matches immediately after a line break character.</p>
        <p>For example, <code>/^A/</code> does not match the 'A' in &quot;an A&quot;, but does match the first 'A' in &quot;An A.&quot;</p></td></tr>
    <tr>
      <td><code>$</code></td>
      <td>
        <p>Matches end of input. If the multiline flag is set to true, also matches immediately before a line break character.</p>
        <p>For example, <code>/t$/</code> does not match the 't' in &quot;eater&quot;, but does match it in &quot;eat&quot;.</p></td></tr>
    <tr>
      <td><code>*</code></td>
      <td>
        <p>Matches the preceding item 0 or more times.</p>
        <p>For example, <code>/bo*/</code> matches 'boooo' in &quot;A ghost booooed&quot; and 'b' in &quot;A bird warbled&quot;, but nothing in &quot;A goat grunted&quot;.</p></td></tr>
    <tr>
      <td><code>+</code></td>
      <td>
        <p>Matches the preceding item 1 or more times. Equivalent to <code>{1,}</code>.</p>
        <p>For example, <code>/a+/</code> matches the 'a' in &quot;candy&quot; and all the a's in &quot;caaaaaaandy&quot;.</p></td></tr>
    <tr>
      <td><code>?</code></td>
      <td>
        <p>Matches the preceding item 0 or 1 time.</p>
        <p>For example, <code>/e?le?/</code> matches the 'el' in &quot;angel&quot; and the 'le' in &quot;angle.&quot;</p>
        <p>If used immediately after any of the quantifiers <code>*</code>, <code>+</code>, <code>?</code>, or <code>{}</code>, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times).</p>
        <p>Also used in lookahead assertions, described under <code>(?=)</code>, <code>(?!)</code>, and <code>(?:)</code> in this table.</p></td></tr>
    <tr>
      <td><code>.</code></td>
      <td>
        <p>(The decimal point) matches any single character except the newline characters: \n \r \u2028 or \u2029. (<code>[\s\S]</code> can be used to match any character including newlines.)</p>
        <p>For example, <code>/.n/</code> matches 'an' and 'on' in &quot;nay, an apple is on the tree&quot;, but not 'nay'.</p></td></tr>
    <tr>
      <td><code>(<em>x</em>)</code></td>
      <td>
        <p>Matches <code><em>x</em></code> and remembers the match. These are called capturing parentheses.</p>
        <p>For example, <code>/(foo)/</code> matches and remembers 'foo' in &quot;foo bar.&quot; The matched substring can be recalled from the resulting array's elements <code>[1], ..., [n]</code> or from the predefined <code>RegExp</code> object's properties <code>$1, ..</code></p></td></tr>
    <tr>
      <td><code><em>x</em>|<em>y</em></code></td>
      <td>
        <p>Matches either <code><em>x</em></code> or <code><em>y</em></code>.</p>
        <p>For example, <code>/green|red/</code> matches 'green' in &quot;green apple&quot; and 'red' in &quot;red apple.&quot;</p></td></tr>
    <tr>
      <td><code>\b</code></td>
      <td>
        <p>Matches a word boundary, such as a space. (Not to be confused with <code>[\b]</code>.)</p>
        <p>For example, <code>/\bn\w/</code> matches the 'no' in &quot;noonday&quot;; <code>/\wy\b/</code> matches the 'ly' in &quot;possibly yesterday.&quot;</p></td></tr>
    <tr>
      <td><code>\B</code></td>
      <td>
        <p>Matches a non-word boundary.</p>
        <p>For example, <code>/\w\Bn/</code> matches 'on' in &quot;noonday&quot;, and <code>/y\B\w/</code> matches 'ye' in &quot;possibly yesterday.&quot;</p></td></tr>
    <tr>
      <td><code>\d</code></td>
      <td>
        <p>Matches a digit character from any alphabet.</p>
        <p>For example, <code>/\d/</code> or <code>/[0-9]/</code> matches '2' in &quot;B2 is the suite number.&quot;</p></td></tr>
    <tr>
      <td><code>\D</code></td>
      <td>
        <p>Matches any non-digit character in any alphabet.</p>
        <p>For example, <code>/\D/</code> or <code>/[^0-9]/</code> matches 'B' in &quot;B2 is the suite number.&quot;</p></td></tr>
    <tr>
      <td><code>\m</code></td>
      <td>
        <p>Matches any alpha or numeric character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\M</code></td>
      <td>
        <p>Matches any non-alpha and non-numeric character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\a</code></td>
      <td><p>Matches any alpha character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\A</code></td>
      <td><p>Matches any non-alpha character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\c</code></td>
      <td><p>Matches any control character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\C</code></td>
      <td><p>Matches any non-control character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\g</code></td>
      <td><p>Matches any character that has graphic representation from any alphabet.</p></td></tr>
    <tr>
      <td><code>\G</code></td>
      <td><p>Matches any character that has no graphic representation from any alphabet.</p></td></tr>
    <tr>
      <td><code>\p</code></td>
      <td><p>Matches any printable or space character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\P</code></td>
      <td><p>Matches any non-printable and non-space character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\l</code></td>
      <td><p>Matches any lower case character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\L</code></td>
      <td><p>Matches any non-lower case character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\u</code></td>
      <td><p>Matches any upper case character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\U</code></td>
      <td><p>Matches any non-upper case character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\n</code></td>
      <td><p>Matches any punctuation character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\N</code></td>
      <td><p>Matches any non-punctuation character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\s</code></td>
      <td><p>Matches any space character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\S</code></td>
      <td><p>Matches any non-space character from any alphabet.</p></td></tr>
    <tr>
      <td><code>\x</code></td>
      <td><p>Matches any hexadecimal character.</p></td></tr>
    <tr>
      <td><code>\X</code></td>
      <td><p>Matches any non-hexadecimal character.</p></td></tr>
    
    </table>
  <p></p>
  <div align="left">
    <table border="0" cellpadding="4" cellspacing="0" width="100%">
      <tr>
        <td colspan="2" valign="middle">
          <h2>Properties</h2></td></tr>
      <tr>
        <td width="117" bgcolor="#ffffff" align="right"><strong><em>length</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">- <em>integer</em>, number of matches after last <em>exec</em> or <em>match</em> methods calls.</td></tr>
      <tr>
        <td width="117" bgcolor="#ffffff" align="right"><strong><em>input</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">- <em>string</em>, last inspected string.</td></tr>
      <tr>
        <td width="117" bgcolor="#ffffff" align="right"><strong><em>source</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">- <em>string</em>, source code of the regular expression - string this RegExp was build from.</td></tr>
      <tr>
        <td width="117" bgcolor="#ffffff" align="right"><strong><em>index</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">- <em>integer</em>, character position where the first successful match begins in a searched string, read-only.</td></tr>
      <tr>
        <td width="117" bgcolor="#ffffff" align="right"><strong><em>lastIndex</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">- <em>integer</em>, character position where the next match begins in a searched string.</td></tr>
      <tr>
        <td width="117" bgcolor="#ffffff" align="right"><strong><em>[index]</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">- <em>string</em> | <em>undefined</em>, read-only, returns n-th matched fragment. <em>Index</em> is a zero based index, integer.</td></tr>
      <tr>
        <td colspan="2" valign="middle">
          <h2>Methods</h2></td></tr>
      <tr>
        <td bgcolor="#ffffff" valign="top" align="right"><em>this</em></td>
        <td bgcolor="#fffff0" valign="middle">
          <p><strong>(regular-expresion [,flags])</strong></p>
          <p>Used for intitalization of new instance of RegExp object. <em>regular-expresion</em> is a string - source of the regular expression. &nbsp;<em>flags</em> is an optional string and if provided may contain characters <em>'i' </em>for case insensitive search<em> </em>and/or <em>'g' -</em> for global search - to find all occurences of source in the input string. <br/>Use this constructor as: <font face="monospace">var re = new RegExp(...);</font></p></td></tr>
      <tr>
        <td bgcolor="#ffffff" valign="top" align="right"><strong><em>test</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">
          <p><strong>(input)</strong> : &nbsp;<em>true</em> | <em>false</em></p>
          <p>Checks <em>input</em> string to see if a pattern exists within a string and returns <strong>true</strong> if so, and <strong>false</strong> otherwise.</p></td></tr>
      <tr>
        <td bgcolor="#ffffff" valign="top" align="right"><strong><em>exec</em></strong></td>
        <td bgcolor="#fffff0" valign="middle">
          <p><strong>(input)</strong> : <em>null</em> | <em>RegExp</em> object</p>
          <p>Returns this RegExp object with length and list of matches set if pattern exists in <em>input</em> string or <em>null</em> otherwise.</p></td></tr></table></div>
</body>
</html>